<%@ page import="com.xyzboom.database.entity.Course" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>添加课程</title>
</head>
<body>
<form method="get" action="<c:url value="/servlets/course/CourseController"/>">
    <table class="table_allCourse" cellspacing="0">
        <tr>
            <th>序号</th>
            <th>课程名称</th>
            <th>选课人数</th>
            <th>课程性质</th>
        </tr>
        <tr>
            <td>
                <label>
                    <input type="number" name="id"/>
                </label>
            </td>
            <td>
                <label>
                    <input type="text" name="name"/>
                </label>
            </td>
            <td>
                <label>
                    <input type="number" name="num"/>
                </label>
            </td>
            <td>
                <label>
                    <select name="type">
                        <%
                            for (Course.CourseType type : Course.CourseType.values()) {
                        %>
                        <option value="<%=type.toString()%>">
                            <%=type.type%>
                        </option>
                        <%
                            }
                        %>
                    </select>
                </label>
            </td>
        </tr>
    </table>
    <input type="submit" value="确定"/>
</form>
</body>
</html>
